package com.pig.provide.http.context;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

import java.util.StringJoiner;

/**
 * @author by 李志伟
 * Create Date: 2019/1/7 20:46
 * Description:
 */
@Configuration
@PropertySource(value = "classpath:provide.properties")
public class ProvideConfig {
    @Value("${provide.http.path}")
    private String httpPath;
    @Value("${provide.socket.port}")
    private String socketPort;

    public String getHttpPath() {
        return httpPath;
    }

    public void setHttpPath(String httpPath) {
        this.httpPath = httpPath;
    }

    public String getSocketPort() {
        return socketPort;
    }

    public void setSocketPort(String socketPort) {
        this.socketPort = socketPort;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", ProvideConfig.class.getSimpleName() + "[", "]")
                .add("httpPath='" + httpPath + "'")
                .add("socketPort='" + socketPort + "'")
                .toString();
    }
}
